import http from "../request";
const apibase = "/api/PrinterManagement";
//查询打印机类型
var getTabPrinterTypeList = function (data) {
    return new Promise((resolve, reject) => {
        http
            .post(apibase + `/GetTabPrinterTypeList`, data)
            .then((res) => {
                resolve(res);
            })
            .catch((error) => {
                reject(error);
            });
    });
};

//新增打印机类型
var InsTabPrinterType = function (data) {
    return new Promise((resolve, reject) => {
        http
            .post(apibase + `/InsTabPrinterType`, data)
            .then((res) => {
                resolve(res);
            })
            .catch((error) => {
                reject(error);
            });
    });
};


//修改打印机类型
var updTabPrinterType = function (data) {
    return new Promise((resolve, reject) => {
        http
            .post(apibase + `/UpdTabPrinterType`, data)
            .then((res) => {
                resolve(res);
            })
            .catch((error) => {
                reject(error);
            });
    });
};


//查询打印机
var getTabPrinterList = function (data) {
    return new Promise((resolve, reject) => {
        http
            .post(apibase + `/GetTabPrinterList`, data)
            .then((res) => {
                resolve(res);
            })
            .catch((error) => {
                reject(error);
            });
    });
};

//新增打印机
var insTabPrinter = function (data) {
    return new Promise((resolve, reject) => {
        http
            .post(apibase + `/InsTabPrinter`, data)
            .then((res) => {
                resolve(res);
            })
            .catch((error) => {
                reject(error);
            });
    });
};


//修改打印机
var updTabPrinter = function (data) {
    return new Promise((resolve, reject) => {
        http
            .post(apibase + `/updTabPrinter`, data)
            .then((res) => {
                resolve(res);
            })
            .catch((error) => {
                reject(error);
            });
    });
};

export { getTabPrinterTypeList, InsTabPrinterType, updTabPrinterType, getTabPrinterList, insTabPrinter, updTabPrinter };
